Function generator for linear interpolation

ABSTRACT

The linear interpolation is realizable in a device having three channels with two integrators disposed respectively in the second and third channels, and a comparator. A memory stores the output of the third channel and a reset unit resets the second and third channels to zero when the comparator detects the equality of the outputs of the first and second channels.

United States Patent FUNCTION GENERATOR FOR LINEAR INTERPOLATION 3 Claims, 12 Drawing Figs.

US. Cl. 235/197, w 7351 3 Int. Cl G06g 7/28 Field of Search 235/ 197,

[56] References Cited UNITED STATES PATENTS 3,043,516 7/1962 Abbott et al 235/195 3,231,729 l/1966 Stern 235/183 3,333,092 7/1967 Hauser, Jr. 235/183 3,383,501 5/1968 Patchell 235/183X 3,412,240 11/1968 Hunt et a1. 235/197X Primar'y Examiner-Malcolm A. Morrison Assistant Examiner-Joseph F. Ruggiero AttorneyWilliam D. Stokes ABSTRACT: The linear interpolation is realizable in a device having three channels with two integrators disposed respectively in the second and third channels, and a comparator. A memory stores the output of the third channel and a reset unit resets the second and third channels to zero when the comparator detects the equality of the outputs of the first and second channels.

PATENTEDFE M 3564.230

sutnuure INVENTOR U54N-CL4UDE 648085! ATTORNEY I PATENTED m1 6 [9H SHEET 6 BF 6 ATTORNEY FUNCTION GENERATOR FOR LINEAR INTERPOLATION This invention relates to generators of functions having several (particularly two) variables, using linear interpolation.

French Pat. No. 1,537,798, filed July 10, 1967 by the Commissariat a IEncrgie Atomique and delivered July 22, 1968, describes a device constituted by a function generator comprising, in combination, a number n, at least equal to three, of channels fed by voltages, variable or constant, proportional to the n input magnitudes, at least two of these channels comprising a function unit, a comparator receiving the voltages of (n 1) of these channels (voltages taken downstream or at the output of the function units which may be disposed in these channels), a storage device connected to the 12" channel, downstream or at the output of the function unit necessarily disposed in this channel, for storing the instantaneous value which is transmitted to it by this n' channel, in response to an order delivered by the comparator when this comparator finds that the algebraic sum of the voltages which arrive at it by the first (n 1) channels has reached a determined value, in particular the value zero, means for transmitting the content of the storage device and means for resetting this device and the function units to their initial conditions.

In a particular embodiment, the device of the above mentioned French Pat. No. 1,537,798 comprises an integrator as function unit in the second channel, on the one hand, and the third channel, on the other hand, whereas the first channel does not comprise any function unit.

The present invention relates to improvements to the above mentioned device, in particular according to the particular embodiment specified above, these improvements having the object of realizing a function generator which permits an analogue magnitude of two or more than two variables to be obtained by linear interpolation, the precision of the generator being limited only by the error of interpolation of the function, having two or more than two variables, to be generated, for the error due to the device according to the above-mentioned French Pat. No. 1,537,798 is less than the interpolation error (except if the number of points of reference for the interpolation is very high, which is not very practical). The principal limitation, in order to guarantee correct operation of the generator of a function of two or more than two variables according to the invention, is the requirement imposed by the device according to the above-mentioned French Pat. No. 1,537,798 which this function generator comprises, namely the slow evolution of the variables in time.

It is recalled that the generators of functions having two variables, at present available on the market, are of the potpadder servomechanism type with inputs on a track at a plurality of distributed, accessible points, a cursor realizing the interpolation between two points; the pass band of such known generators is limited to a few cycles per second by the mechanical system on the input which determines the position of the cursor.

The invention will be able to be well understood from the following complementary description, as well as the accompanying drawings, which complementary description and drawings are given merely by way of example.

In the drawings:

FIGS. 1 and 2 represent two graphs of linear interpolation;

FIGS. 3 and 4 represent, in the form of function blocks, two ensembles used in a generator according to the invention, namely respectively an integrator with an unblocking gate and a device according to the above-mentioned French Pat. No. 1,537,798;

FIGS. 5 and 6 illustrate, in the form of function blocks, an interpolator respectively for one and several segments constructed from the ensembles according to FIGS. 3 and 4;

FIGS. 7 and 8 illustrate similarly the devices to be added to the interpolator of FIG. 6 in order to constitute a generator of functions of two variables, provided with the improvements according to this invention;

FIGS. 9, l0 and 11 represent the curves or graphs showing the evolution of a particular function of two variables, namely of the density of carbon dioxide as a function of its temperature and of its pressure; and

FIG. 12 illustrates the device to be added to the interpolator of FIG. 6 in order to constitute a particular function generator according to the invention adapted for the generation of the particular function mentioned above represented by the curves of FIGS. 9 to 11.

The use of the integrators R R the comparator C, the memory M and the reset means Q, is described in the abovementioned French Pat. No. 1,537,798. Each integrator is constituted by an analogue amplifier mounted in parallel with a condenser F and F Means for resetting Q to zero comprise the discharge of each condenser F and F by associated transistors T, and T (FET), illustrated in FIG. 7 of this French patent. The memory M is constituted by a low-loss capacitator. The comparator C is an open-loop gain amplifier. The use of these elements in the present invention will be clear from the description below in conjunction with the drawings.

Before explaining the invention in detail, the mathematical expression of a linearly interpolated function will be studied.

Let z be a (general) function of two variables x and y, and let there by (n +1 (particular) functions, in the plane defined by z and x, for (n +1) particular values of y: y,,, y ',...y, y,, y, ,...y,,, these functions being noted:

(2.1 =f( in.)

If it is wished to interpolate the function y between two values y, and y,+, of the variable y for a value x, of the variable x, and if the function z(x,,, y) is called z(y), the following relationships will be true, as visible directly on FIG. 1:

a. whatever he y such that y gysyfi z(y)=z1-H yi) q i+1 i yi+1 ya b. whatever be y such that y gygy,

+(yyi)( -t my that is to say g (y d. more generally still, by taking one more segment of l (the segment for which y is comprised between y and yr, the result will be, whatever be i2 yfiyfi z z( y) zrz+(yyz) v+(yyrl)( fi y) (yy11- (yyi)( B y 1),

e. in the most general manner, by extending the domain of I the variable y to the complete domain envisaged, that is to say for all ys such that Y sygy the relationship will be:

by putting ri l-1 In order to realize the linear interpolation of z( y), it is sufficient to generate a function of time having the aspect of the broken line with successive ramps of FIG. 2, to make correspond to each y,- of the interval envisaged at time t given by t,-= k y,- (It being a constant) and to sample, in a memory element (with a device of the type forming the subject matter of French Pat. No. 1,537,798 and illustrated in FIG. 4 of the ac companying drawings). The value of the voltage (which represents z) corresponding to the time t= k y, y being the value of the variable indicated during the measurement.

It suffices to repeat the operation in time, the output magnitude V, then representing z( y) z(x y).

it is a question of generating a succession of ramps such that E Y-mean.

If this integrator R, of time constant k, has not one input (as illustrated in FIG. 3), but n inputs, each unblocked by a gate at the instant indicated in the table herebelow and fed respectively by the voltage indicated on the same line of the table Instant of In ut the output voltage will be of the form this formula (3) being identical with (1), when account is taken of (2) and that the indices 1' andj are dummy indices.

The interpolation can thus be realized by means of a particular device according to the above mentioned French Pat.

No. 1,537,798 having two integrators, one in the second channel and the other in the third channel, namely of the multiplier with sampling type, which is reproduced in FIG. 4. In this FIG., the designation is as follows:

A,, A A the three inputs;

R R the integrators of the channels L and L C the comparator of the outputs of the channels L and L M the device for memorizing or storing the output of the channel L when the comparator C detects the equality of the outputs of L and L Q the device for resetting to zero, or to the initial state, the integrators R and R also in response to the detection of this equality; and

V the output voltage of M, that is to say the stored magnitude.

Supposing that the two integrators R and R have the same time constant T, by applying to the three inputs A A A respectively the voltages V(y) Ky, V and E; (K being a constant), the outputs of the channels L L L will be respectively 25 Kg, V ;2

the comparator C triggering the storing at the instant I, of

and this voltage which constitutes V, is stored or memorized, the device M then resetting to zero the integrators R and R;,, which permits the cycle to begin again. (A complementary explanation regarding the circuitry and the operation of the generator of FIG. 4 is given in the above mentioned French Pat. No. 1,537,798)

In order to realize an interpolator, it is appropriate to modify slightly the schematic diagram of FIG. 4, taking into account the circuit of FIG. 3.

First, let us consider the realization of an elementary inter polator for a single straight line segment. In this case, the circuit is the one shown in FIG. 5, which differs from the one shown in FIG. 4 by the use of a second comparator C comparing the output of the channel L with the output of a first supplementary channel L. having an input A,,, and of an electronic gate P,-, disposed in the channel L upstream of R and closed under the control of C when C,- detects the equality of the outputs of L and L.,, the P.- -R ensemble being the one discussed above with reference to FIG. 3.

The triggering of C takes place when t= t i, which closes P whereas the triggering of C always takes place when t= t Finally,

In order to simplify FIG. 5, the device Q for resetting to zero of FIG. 4 has not been shown, but of course this device exists in the real circuit.

In FIG. 6 (in which, by contrast, the device Q for resetting the integrators to zero has been shown), a linear interpolator for n straight line segments is illustrated. This interpolator comprises n ensembles of the comparator-gate type, each comparator C D C ,...C,, comparing the output of L with the output of a particular channel U U L' ,...L',, receiving the input voltage V(y,) =Ky V(y =Ky V(y =Ky ,..V,,) I K y,, respectively and closing the associated gate P P P,.....P., which is placed in a channel If. If. I". I"

and feeding an integrator R having (n 1) inputs (which replaces the integrator R having one input) at the same time as a channel L", without gate to which is applied the input voltage E,,. It is supposed that V, and V(y,-) are of the same sign.

Let r, be the time constant of the integrator R and 1 that of the integrator R the comparator C is triggered at the instant whereas the comparators C,, C C,, will be triggered by t= t,, t t= 1,, when it will close the associated gate P,, P ,...P The device Q for resetting to zero will be actuated by the comparator C.

At the output of the integrator R the voltage will be In order to construct, from the interpolator of FIG. 6, a generator of a function having two variables, it is sufficient to provide means for making the input magnitudes E, of the interpolator vary as a function of X.

Now

i+i i i i-1 yi+l yi tit-11M in which formula 2.- Z( m yr)- lfx, evolves, z.- z(x, y;) and E, is a function ofx. v In the most general case, a generator of the type illustrated in FIG. 7 can be realized for each E,, comprising: I

three segment function generators G,, G and G generating respectively zrh, Z1 and z,, from the common input magnitude x:

two differential amplifiers D,, D deducing the input marked 1 from the input marked +1; the first is fed by the output of G, applied at +1 and the output of G applied at 1 and the second by the output of G applied at +1 and the output of G applied at -1;

two dividers or quotientmeters l-I,, H dividing the outputs (differences concerning x) of D, and D respectively by the corresponding differences concerning y; and

a differential amplifier G whose input +1 receives the output of H, and whose input 1 receives the output of H and which delivers E,-.

If (n 1) units of the type illustrated in FIG. 7 generating respectively E,,, E,, E,, E,,... E,, are disposed upstream of the (n+ 1 )inputs so marked of the device of FIG. 6, there is finally obtained a generator of a function z of two variables x, y realized according to the invention.

In the case where the function 2 is fixed, it can be advantageous to generate directly, by segment generators G the terms and to subtract them two by two in differential amplifiers H, as illustrated in FIG. 8, constituting a variant of (n l) ensembles according to FIG. 7.

his this solution which has been used in the particular function generator intended to generate (as the function) the volumic mass of carbonic gas as a function of the temperature and of the pressure to which it is subjected, which will be discussed hereafter with reference to FIGS. 9 to 12, as an example of a practical application of this invention.

Let r f (T, p) be the volumic mass r of the carbonic gas as a function of its temperature Tand of its pressure P. When the input magnitudes Tand p vary slowly in time (for example the maximum gradient of temperature reaches 500 C. per minute), as in a nuclear reactor cooled by circulation of carbonic gas in closed circuit, r can be calculated by putting the invention into practice with more than five samplings per second.

In FIGS. 9 and 10 have been shown the variations of r respectively when T varies from 40 C. to 700 C. (for several values of p) and when p varies from 0 to bars (for several values of T).

Functions r( T, p.) have been chosen such that, in a useful region 200 Cfi T$700 C., the error of linear interpolation does not exceed 0.2 percent both for the variable Tand for the interpolation between p,- and p this inperative determines five functions r( T, Pi), namely for p, 7 bars p 19 bars p 35 bars p., 55 bars p 78 bars represented by the five curves of FIG. 9, each constituted in fact by 18 straight line segments.

Five function generators of the type G, of FIG. 8 give directly the terms of the type i+1 i T Pin-Pi which occur in the formula of the linear interpolation and whose variations are represented on FIG. 11 (to clarify this FIG. only the two extreme curves have been traced entirely).

From the above mentioned terms, five terms are obtained of the type 'l+l 'i Pi+1 Pi by means of a circuit having four differential amplifiers H,, illustrated in FIG. 12, whose five inputs are fed as indicated above by five function generators of the type G, (FIG. 8) and whose five outputs are delivered to an interpolator of the type illustrated in FIG. 6, in which the index n is equal to 4.

The combination of these five generators, of the circuit of FIG. 12, whose five inputs are connected each to the output of one of these generators, and of the circuit of FIG. 6 when n 4 constitutes the overall generator of the function r f (T, p) for carbonic gas.

So far, the description has been limited to the generation of a function of two variables.

The invention is also applicable to the realization of a generator of a function having three variables.

Indeed, in order to generate a function z(x, y, u) of three variables x, y, u, a first generator of a function having two variables (x, y) of the type described previously (constituted by the combination of the circuit of FIG. 8 and the circuit of FIG. 6 fed by the outputs of the circuit of FIG. 8) permits z (x, y, u,,) which is noted 2 to be obtained for a particular value u, of u;

other generators of a function having two variables (x, y) of the same type (FIG. 8 FIG. 6) permit z(x, y, 14,), noted z,, for u u z(x, y, :4 noted for u a a great number of points with respect to all the variables; it can thus be arranged to realize the interpolation which requires the fewest points in the last place.

It is thus seen that the invention permits the realization of a generator adapted to calculate functions of two or more than two variables, which presents, with respect to the function generators already existant, numerous advantages, in particular the following:

First of all its precision is only limited by the error of interpolation of the function to be generated.

The generator can be realized from standard units (amplifiers, integrators, comparators, etc.) easily available on the market.

One can pass very easily from the calculation of one function to another.

Although the present invention has been described with specific reference to particular examples, it is clear that the invention should not be so limited, since various modifications and changes can be made without departing from the scope or spirit of this invention.

I claim:

1. A generator of a function z (x, y) of at least two variables x, y, which comprises in combination:

a linear interpolator of a function of y for the field of values y,, y,, y y,,, ofy, constituted by:

a first channel (l comprising an integrator and supplied with a negative supply voltage,

a second channel (L comprising an integrator and supplied with a negative supply voltage;

n other channels (U U L ,-L,,), called direct input channels, supplied by voltages k y k y k y ,-k y,, respectively:

n other channels (L",, L",, L" ,L",,), called indirect input channels and comprising a gate (P,, P ,-P,,),

a last channel (L",,) of indirect input without a gate;

each of said channels having an input and at least one outlet;

a first comparator comparing the voltage at the output of the first channel (L,) with the voltage at the output of the second channel (L and emitting a signal of equality when these two voltages are equal;

n other comparators (C C C ,C") each comparing the voltage at the output of the second channel (L with the voltage at the output of one of the n direct input channels (L,, L' L' ,-L',,) to open a gate (P P P ,P,,) in one of the n indirect input channels (L" L" L" ,L",,) in response to asignal of equality emitted by itself;

an integrator with (n 1) inputs, receiving the outputs of(n l) indirect input channels constituted by the said n channels with gate (L",, L" L" ,L",,) and said last channel (L",,) without gate, and with one output;

a storage unit connected to theoutput of the integrator with (n 1) channels and storing the value received under the control of the signal of equality emitted by said first comparator; and

means for resetting to zero the integrators in response to the signal of equality emitted by said first comparator; and, a system constituted by generators of a function by segments, ofa variable (6,, G G G with an input receiving each x and an output and differential amplifiers (0,, D H with two inputs and an output, each of said differential amplifiers receiving at its two inputs the outputs of two such generators of successive ranks, this system supplying the inputs of (N l) indirect input channels (L",,, L,, L",,L" -L",,) ofsaid linear interpolator.

2. A generator of a function of two variables according to claim 1, wherein said system further comprises dividers adapted to divide the output voltage of each differential amplifier by the difference concerning one of the variables, whereas the differential amplifiers are adapted to operate on the difference concerning the other variable.

3. A generator of a function of two variables according to claim 1 wherein in said s stem the differential amplifiers are adapted to operate direct y on the differences concerning the two variables. 

1. A generator of a function z (x, y) of at least two variables x, y, which comprises in combination: a linear interpolator of a function of y for the field of values yo, y1, y2, ... yn, of y, constituted by: a first channel (l2) comprising an integrator and supplied with a negative supply voltage, a second channel (L2) comprising an integrator and supplied with a negative supply voltage; n other channels (L''1, L''2, L''3,- L''n), called direct input channels, supplied by voltages k y1, k y2, k y3,- k yn respectively: n other channels (L''''1, L''''2, L''''3,- L''''n), called indirect input channels and comprising a gate (P1, P2, 3,- Pn), a last channel (L''''o) of indirect input without a gate; each of said channels having an input and at least one outlet; a first comparator comparing the voltage at the output of the first channel (L1) with the voltage at the output of the second channel (L2) and emitting a signal of equality when these two voltages are equal; n other comparators (C1, C2, C3,- Cn) each comparing the voltage at the output of the second channel (L2) with the voltage at the output of one of the n direct input channels (L''1, L''2, L''3,- L''n) to open a gate (P1, P2, P3,- Pn) in one of the n indirect input channels (L''''1, L''''2, L''''3,- L''''n) in response to a signal of equality emitted by itself; an integrator with (n + 1) inputs, receiving the outputs of (n + 1) indirect input channels constituted by the said n channels with gate (L''''1, L''''2, L''''3,- L''''n) and said last channel (L''''o) without gate, and with one output; a storage unit connected to the output of the integrator with (n + 1) channels and storing the value received under the control of the signal of equality emitted by said first comparator; and means for resetting to zero the integrators in response to the signal of equality emitted by said first comparator; and, a system constituted by generators of a function by segments, of a variable (G1, G2, G3; Gz) with an input receiving each x and an output and differential amplifiers (D1, D2; Hz) with two inputs and an output, each of said differential amplifiers receiving at its two inputs the outputs of two such generators of successive ranks, this system supplying the inputs of (N + 1) indirect input channels (L''''o, L''''1, L''''2,L''''3,... -L''''n) of said linear interpolator.
 2. A generator of a function of two variables according to claim 1, wherein said system further comprises dividers adapted to divide the output voltage of each differential amplifier by the difference concerning one of the variables, whereas the differential amplifiers are adapted to operate on the difference concerning the other variable.
 3. A generator of a function of two variables according to claim 1, wherein in said system the differential amplifiers are adapted to operate directly on the differences concerning the two variables. 